<!doctype html>
<html lang="en" data-framework="elm">
<head>
	<meta charset="utf-8">
	<title>Elm • TodoMVC</title>
	<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
	<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
	<style>
		body {
			width: auto;
		}
		.todomvc-wrapper {
			visibility: visible !important;
		}
	</style>
</head>

<body>
<script src="build/elm.js"></script>
<script>
	(function () {
		var result = localStorage.getItem('elm-todo-model');
		var savedModel = result ? JSON.parse(result) : null;

		var todomvc = Elm.Todo.fullscreen(savedModel);

		todomvc.ports.save.subscribe(function (model) {
			localStorage.setItem('elm-todo-model', JSON.stringify(model));
		});
	}());
</script>
<script async src="node_modules/todomvc-common/base.js"></script>
</body>
</html>
